<?php
/* [$WindsForce] (C)Hunzhiwange.COM Since 2012.03.17.
   家居首页显示($$)*/

!defined('Q_PATH') && exit;

class Index_C_Controller extends InitController{

	public function index(){
		// 初始化城市SEO
		if($GLOBALS['_commonConfig_']['DEFAULT_APP']=='jiaju'){
			$this->_arrSeo=Core_Extend::getSeocity($GLOBALS['_citysite_']);
		}else{
			Core_Extend::getSeo($this,array('title'=>Q::L('家居装饰','Controller')),true,false,true);
		}

		// 载入相关缓存
		Core_Extend::loadCache('jiaju_hotsite');// 热门城市
		Core_Extend::loadCache('jiaju_roundsite'.Core_Extend::getCityCache());// 周边城市
		Core_Extend::loadCache('jiaju_newhotarticle'.Core_Extend::getCityCache());// 最新&热门文章
		Core_Extend::loadCache('jiaju_pingpaicompany'.Core_Extend::getCityCache());// 读取推荐品牌
		Core_Extend::loadCache('jiaju_paihangcompany'.Core_Extend::getCityCache());// 读取排行榜
		Core_Extend::loadCache('jiaju_hotcase'.Core_Extend::getCityCache());// 读取精选作品
		Core_Extend::loadCache('jiaju_hotevent'.Core_Extend::getCityCache());// 读取优惠活动
		Core_Extend::loadCache('jiaju_newbidding'.Core_Extend::getCityCache());// 读取最新招标
		Core_Extend::loadCache('jiaju_indexad'.Core_Extend::getCityCache());// 载入广告缓存

		$this->assign('arrHotCitysites',$GLOBALS['_cache_']['jiaju_hotsite']);
		$this->assign('arrRoundCitysites',$GLOBALS['_cache_']['jiaju_roundsite'.Core_Extend::getCityCache()]);
		$this->assign('arrNews',$GLOBALS['_cache_']['jiaju_newhotarticle'.Core_Extend::getCityCache()]['new']);
		$this->assign('arrHots',$GLOBALS['_cache_']['jiaju_newhotarticle'.Core_Extend::getCityCache()]['hot']);
		$this->assign('arrPingpaiJiajucompanys',$GLOBALS['_cache_']['jiaju_pingpaicompany'.Core_Extend::getCityCache()]);
		$this->assign('arrPaihangJiajucompanys',$GLOBALS['_cache_']['jiaju_paihangcompany'.Core_Extend::getCityCache()]);
		$this->assign('arrCases',$GLOBALS['_cache_']['jiaju_hotcase'.Core_Extend::getCityCache()]);
		$this->assign('arrEvents',$GLOBALS['_cache_']['jiaju_hotevent'.Core_Extend::getCityCache()]);
		$this->assign('arrBiddings',$GLOBALS['_cache_']['jiaju_newbidding'.Core_Extend::getCityCache()]);
		$this->assign('arrIndexads',$GLOBALS['_cache_']['jiaju_indexad'.Core_Extend::getCityCache()]);
		$this->display('public+index');
	}

}
